<?php

class Rcp_Methods_Data_CalendarEvent {

  /**
   *
   * @var int
   */
  public $id;

  /**
   *
   * @var string 
   */
  public $date;

  /**
   *
   * @var string 
   */
  public $startDate;

  /**
   *
   * @var string 
   */
  public $endDate;

  /**
   *
   * @var int 
   */
  public $extraTime;
  
  /**
   * 
   * @var Rcp_Methods_Data_CalendarEventType
   */
  public $type = null;

  public function __construct(RcpCalendarEvents $event) {
    $this->id = $event->getId();
    $this->date = $event->getDate();
    $this->startDate = $event->getStartDate();
    $this->endDate = $event->getEndDate();
    $this->extraTime = $event->getExtraTime();
    if ($event->getEventDefs() instanceof RcpEventDefs)
    	$this->type = new Rcp_Methods_Data_CalendarEventType($event->getEventDefs());
  }

}
